package com.yonyou.cyxdms.basedata.service.entity.configurer;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.yonyou.cyxdms.framework.bean.dto.base.DMSBaseDTO;
import com.yonyou.cyxdms.framework.bean.entity.base.DMSBasePO;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 配置
 * </p>
 *
 * @author renwd
 * @since 2018-12-11
 */
@TableName("tm_package")
public class PackagePO extends DMSBasePO<PackagePO> {

    private static final long serialVersionUID = 1L;

    /**
     * PACKAGE_ID
     */
    @TableId(value = "PACKAGE_ID", type = IdType.AUTO)
    private Long packageId;


    /**
     * APP_ID
     */
    @TableField("APP_ID")
    private String appId;

    /**
     * 品牌ID
     */
    @TableField("BRAND_ID")
    private Long brandId;

    /**
     * 车系ID
     */
    @TableField("SERIES_ID")
    private Long seriesId;

    /**
     * MODELID
     */
    @TableField("MODEL_ID")
    private Long modelId;

    /**
     * 公司代码
     */
    @TableField("COMPANY_CODE")
    private String companyCode;
    /**
     * 所有者代码
     */
    @TableField("OWNER_CODE")
    private String ownerCode;

    /**
     * 所有者的父组织代码（用于二网使用）
     */
    @TableField("OWNER_PAR_CODE")
    private String ownerParCode;

    /**
     * 配置代码
     */
    @TableField("CONFIG_CODE")
    private String configCode;
    /**
     * 配置名称
     */
    @TableField("CONFIG_NAME")
    private String configName;


    /**
     * 资料来源
     */
    @TableField("DATA_SOURCES")
    private Integer dataSources;

    /**
     * 含税采购价
     */
    @TableField("TAX_PURCHASE_PRICE")
    private Double taxPurchasePrice;

    /**
     * 指导价(万)
     */
    @TableField("REFER_PRICE")
    private Double referPrice;

    /**
     * 最低价格
     */
    @TableField("MIN_PRICE")
    private Double minPrice;

    /**
     * 最高价格
     */
    @TableField("MAX_PRICE")
    private Double maxPrice;


    /**
     * 车型缩略图
     */
    @TableField("CARPARAM_SINGLE_PIC")
    private String carparamSinglePic;

    /**
     * 车型详情图片
     */
    @TableField("CARPARAM_PIC")
    private String carparamPic;

    /**
     * 排量
     */
    @TableField("DIS_PLACEMENT")
    private String disPlacement;

    /**
     * 变速箱
     */
    @TableField("TRANS_MISSION")
    private String transMission;

    /**
     * 配置级别
     */
    @TableField("GRADE")
    private String grade;

    /**
     * 配置介绍
     */
    @TableField("CARPARAM_INTRODUCE")
    private String carparamIntroduce;

    /**
     * 上游数据来源ID
     */
    @TableField("SOURCE_ID")
    private String sourceId;

    @TableField("SOURCE_CHANGED_AT")
    private LocalDateTime sourceChangedAt;

    /**
     * 是，否
     */
    @TableField("IS_VALID")
    private Integer isValid;

    @TableField("START_DATE")
    private LocalDateTime startDate;

    @TableField("CREATED_BY")
    private String createdBy;

    @TableField("CREATED_AT")
    private LocalDateTime createdAt;
    
    @TableField("IS_ISSUE")
    private Integer isIssue;

    @TableField("SEND_DATE")
    private LocalDateTime sendDate;
    
    @TableField("SEND_BY")
    private String sendBy;

    @TableField("VALID_START_DATE")
    private LocalDateTime validStartDate;

    @TableField("VALID_END_DATE")
    private LocalDateTime validEndDate;

    @TableField("START_TYPE")
    private Integer startType;

    @TableField("DEALER_PRICE")
    private BigDecimal dealerPrice;

    @TableField("OEM_PRICE")
    private BigDecimal oemPrice;
    
    public Long getPackageId() {
        return packageId;
    }

    public void setPackageId(Long packageId) {
        this.packageId = packageId;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public Long getModelId() {
        return modelId;
    }

    public void setModelId(Long modelId) {
        this.modelId = modelId;
    }

    public String getCompanyCode() {
        return companyCode;
    }

    public void setCompanyCode(String companyCode) {
        this.companyCode = companyCode;
    }

    public String getOwnerCode() {
        return ownerCode;
    }

    public void setOwnerCode(String ownerCode) {
        this.ownerCode = ownerCode;
    }

    public String getOwnerParCode() {
        return ownerParCode;
    }

    public void setOwnerParCode(String ownerParCode) {
        this.ownerParCode = ownerParCode;
    }

    public String getConfigCode() {
        return configCode;
    }

    public void setConfigCode(String configCode) {
        this.configCode = configCode;
    }

    public String getConfigName() {
        return configName;
    }

    public void setConfigName(String configName) {
        this.configName = configName;
    }

    public Integer getDataSources() {
        return dataSources;
    }

    public void setDataSources(Integer dataSources) {
        this.dataSources = dataSources;
    }

    public Double getTaxPurchasePrice() {
        return taxPurchasePrice;
    }

    public void setTaxPurchasePrice(Double taxPurchasePrice) {
        this.taxPurchasePrice = taxPurchasePrice;
    }

    public Double getReferPrice() {
        return referPrice;
    }

    public void setReferPrice(Double referPrice) {
        this.referPrice = referPrice;
    }

    public Double getMinPrice() {
        return minPrice;
    }

    public void setMinPrice(Double minPrice) {
        this.minPrice = minPrice;
    }

    public Double getMaxPrice() {
        return maxPrice;
    }

    public void setMaxPrice(Double maxPrice) {
        this.maxPrice = maxPrice;
    }

    public String getCarparamSinglePic() {
        return carparamSinglePic;
    }

    public void setCarparamSinglePic(String carparamSinglePic) {
        this.carparamSinglePic = carparamSinglePic;
    }

    public String getCarparamPic() {
        return carparamPic;
    }

    public void setCarparamPic(String carparamPic) {
        this.carparamPic = carparamPic;
    }

    public String getDisPlacement() {
        return disPlacement;
    }

    public void setDisPlacement(String disPlacement) {
        this.disPlacement = disPlacement;
    }

    public String getTransMission() {
        return transMission;
    }

    public void setTransMission(String transMission) {
        this.transMission = transMission;
    }

    public String getGrade() {
        return grade;
    }

    public void setGrade(String grade) {
        this.grade = grade;
    }

    public String getCarparamIntroduce() {
        return carparamIntroduce;
    }

    public void setCarparamIntroduce(String carparamIntroduce) {
        this.carparamIntroduce = carparamIntroduce;
    }

    public String getSourceId() {
        return sourceId;
    }

    public void setSourceId(String sourceId) {
        this.sourceId = sourceId;
    }

    public LocalDateTime getSourceChangedAt() {
        return sourceChangedAt;
    }

    public void setSourceChangedAt(LocalDateTime sourceChangedAt) {
        this.sourceChangedAt = sourceChangedAt;
    }

    public Integer getIsValid() {
        return isValid;
    }

    public void setIsValid(Integer isValid) {
        this.isValid = isValid;
    }

    public Long getBrandId() {
        return brandId;
    }

    public void setBrandId(Long brandId) {
        this.brandId = brandId;
    }

    public Long getSeriesId() {
        return seriesId;
    }

    public void setSeriesId(Long seriesId) {
        this.seriesId = seriesId;
    }

    public LocalDateTime getStartDate() {
        return startDate;
    }

    public void setStartDate(LocalDateTime startDate) {
        this.startDate = startDate;
    }

    @Override
    public String getCreatedBy() {
        return createdBy;
    }

    @Override
    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }

    @Override
    public LocalDateTime getCreatedAt() {
        return createdAt;
    }

    @Override
    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }
    
    

    public Integer getIsIssue() {
		return isIssue;
	}

	public void setIsIssue(Integer isIssue) {
		this.isIssue = isIssue;
	}

	public LocalDateTime getSendDate() {
		return sendDate;
	}

	public void setSendDate(LocalDateTime sendDate) {
		this.sendDate = sendDate;
	}

	public String getSendBy() {
		return sendBy;
	}

	public void setSendBy(String sendBy) {
		this.sendBy = sendBy;
	}

    public LocalDateTime getValidStartDate() {
        return validStartDate;
    }

    public void setValidStartDate(LocalDateTime validStartDate) {
        this.validStartDate = validStartDate;
    }

    public LocalDateTime getValidEndDate() {
        return validEndDate;
    }

    public void setValidEndDate(LocalDateTime validEndDate) {
        this.validEndDate = validEndDate;
    }

    public Integer getStartType() {
        return startType;
    }

    public void setStartType(Integer startType) {
        this.startType = startType;
    }

    public BigDecimal getDealerPrice() {
        return dealerPrice;
    }

    public void setDealerPrice(BigDecimal dealerPrice) {
        this.dealerPrice = dealerPrice;
    }

    public BigDecimal getOemPrice() {
        return oemPrice;
    }

    public void setOemPrice(BigDecimal oemPrice) {
        this.oemPrice = oemPrice;
    }

    @Override
    public String toString() {
        return "PackagePO{" +
                "packageId=" + packageId +
                ", appId='" + appId + '\'' +
                ", brandId=" + brandId +
                ", seriesId=" + seriesId +
                ", modelId=" + modelId +
                ", companyCode='" + companyCode + '\'' +
                ", ownerCode='" + ownerCode + '\'' +
                ", ownerParCode='" + ownerParCode + '\'' +
                ", configCode='" + configCode + '\'' +
                ", configName='" + configName + '\'' +
                ", dataSources=" + dataSources +
                ", taxPurchasePrice=" + taxPurchasePrice +
                ", referPrice=" + referPrice +
                ", minPrice=" + minPrice +
                ", maxPrice=" + maxPrice +
                ", carparamSinglePic='" + carparamSinglePic + '\'' +
                ", carparamPic='" + carparamPic + '\'' +
                ", disPlacement='" + disPlacement + '\'' +
                ", transMission='" + transMission + '\'' +
                ", grade='" + grade + '\'' +
                ", carparamIntroduce='" + carparamIntroduce + '\'' +
                ", sourceId=" + sourceId +
                ", sourceChangedAt=" + sourceChangedAt +
                ", isValid=" + isValid +
                ", startDate=" + startDate +
                ", createdAt=" + createdAt +
                ", createdBy=" + createdBy +
                '}';
    }

    /**
     * 将PO 信息转化为DTO
     *
     * @param dto 需要进行转换的dto
     * @author renwd
     * @since 2018/7/22 0022
     */
    protected <T extends DMSBaseDTO> void transDtoToPo(T dto) {
        BeanMapperUtil.copyProperties(this, dto, "packageId");
    }


}
